Last Updated: 2019-08-16
Turning on a light is always a good way to get things started. So for this first tutorial we will do just that and push a button to turn on a light
As it turns out it is much easier and faster to model a circuit abstractly because it hides all the details.
In this example we don't have to know anything about the power supply, the type of button or light, resistor values, device footprint or layout and so on.
What we really mean by an abstract model is that we care about the end behaviour not the details of how the behaviour occurs. This idea of abstract models will be a recurring theme when working with VBB.
In this codelab, you're going to build a an abstract light and switch from scratch and explore it's behaviour by interacting with it visually.
When you first start VBB by default a New Project is created for you ready to go.
There are two basic things you do in VBB.
VBB in Design Mode is where you layout, wire up and optionally code components to create virtualizable systems.
In Design Mode you work with Design Sheets which are viewed in one of view panes. There are several different kinds of Design Sheet but by default the Breadboard Design Sheet is added by the New Project template.
When the design is layed out you press Power Up button to power the circuit model and execute a virtualization of the design. Virtualizations are interactive so for example you can press the button to turn on the light.
The DIP button is a very useful abstract interactive component. It is a voltage source which you can switch HIGH (nominally 5V) and LOW ( 0V - Ground ). We are going to use the DIP to turn on a light.
The Toolbox ToolTab contains design elements that can be placed onto the Virtual Breadboard Design Sheet.. Components can be searched for by name, description or keyword or can be browsed using the groups and component list view.
Follow these steps to place the DIP:
A common gotcha is to try and drag-and-drop components where the correct action is click-place-click
Let's use the LED light also in the Toolbox. The LED is also an abstract model in that it could be any kind of light. It's really just a logic test probe to help visualize circuit behavior.
Repeat the steps used for the DIP to place the LED:
Looks like we need to rotate the LED so it's input pin can be aligned with the output pin of the DIP.
To rotate the LED component:
The pins are not yet not connected so move the LED until the end of the pins have snapped to the same grid position.
To move the LED component:
VBB has two modes, design mode and virtualization mode. When a design is ready you can press the Power Up button to power up the circuit and switch to virtualization mode.
To power up Virtualization:
VBB Virtualizations execute in real-time and the idea is that you can interact with the user interface components such as buttons, dials and knobs just like you would real hardware.
To interact with the virtualization:
The really nice thing about working with virtual hardware is you iteratively develop things. So you add some hardware, run that to try it, then go back to design mode and add new hardware or change things around then run it again
Thus the normal procedure is design, virtualize, design some more, virtualize again and so on until your hardware works the way it should.
Designing hardware has never been so much fun!
Congratulations, you've successfully built and run you first Virtual Breadboard circuit! !
Check out some of these codelabs...